<!DOCTYPE html>
<html>

<head>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>H+ Allocation List</title>
    <link rel="shortcut icon" href="../content/static/img/favicon.ico">
    <link href="../content/css/common_modal.css" rel="stylesheet">
    <link href="../content/static/css/bootstrap.min.css?v=3.3.5" rel="stylesheet">
    <link href="../content/static/css/plugins/chosen/chosen.css" rel="stylesheet">
    <link href="../content/static/css/font-awesome.min.css?v=4.4.0" rel="stylesheet">
    <link href="../content/js/lib/vue/select2.min.css" rel="stylesheet">
    <link href="../content/js/lib/calendar/calendar.css" rel="stylesheet">
    <link href="../content/js/lib/calendar/scrollbar.css" rel="stylesheet">
    <link href="../content/static/css/style.min.css?v=4.0.0" rel="stylesheet">
    <style>
        table-th{
            font-size: 12px;
            font-family: tahoma, "Microsoft YaHei", "Hiragino Sans GB", Arial, sans-serif;
            line-height: 1.42857143;
            color: #333;
            background-color: #f5f5f5;
        }
        table tr{ height:40px;}
</style>
</head>

<body class="content-container">
    <div class="wrapper wrapper-content animated fadeInRight">
        <div class="row">
            <div class="col-sm-12">
                <div class="ibox float-e-margins">
                    <div class="ibox-title">
                        <ol class="breadcrumb">
                            <li>
                                <a>Stock Management</a>
                            </li>
                            <li>
                                <a>Allocation List</a>
                            </li>
                        </ol>
                    </div>
                    <div class="content-wrapper">
                        <div class="search-condition">
                            <div>
                                <div class="filter-wrapper">
                                    <ul class="clearfix">
                                        <li class="filter-item ">
                                            <label>Allocate Code</label>
                                            <div>
                                                <div class="fill-wrapper">
                                                    <input id="serialNumber" type="text" class="fill-item">
                                                </div>
                                            </div>
                                        </li>
                                        <li class="filter-item ">
                                            <label>Item Name</label>
                                            <div>
                                                <div class="fill-wrapper">
                                                    <input id="serialNumber" type="text" class="fill-item">
                                                </div>
                                            </div>
                                        </li>
                                        <li class="filter-item ">
                                            <label>Order Query Cycle</label>
                                            <div>
                                                <div class="fill-wrapper fill-wrapper-auto">
                                                    <input id="costTimeStart" type="text" class="fill-item  revision-time"
                                                        readonly="readonly">
                                                </div>
                                                <div class="fill-desc">To</div>
                                                <div class="fill-wrapper fill-wrapper-auto">
                                                    <input id="costTimeEnd" type="text" class="fill-item  revision-time"
                                                        readonly="readonly">
                                                </div>
                                            </div>
                                        </li>
                                        <li class="filter-item ">
                                            <label>Audit Status</label>
                                            <div>
                                                <select v-select2 id="approveStatus">
                                                    <option value='0'>all</option>
                                                    <option value='1'>pending CEO approval</option>
                                                    <option value='2'>pending finance staff approval</option>
                                                    <option value='3'>pending leadership approval</option>
                                                </select>
                                            </div>
                                        </li>
                                        <li class="filter-item ">
                                            <label>Return Status</label>
                                            <div>
                                                <select v-select2 id="status">
                                                    <option value='0'>all</option>
                                                    <option value='1'>returned</option>
                                                    <option value='2'>no return</option>
                                                </select>
                                            </div>
                                        </li>
                                        <li class="filter-item ">
                                            <label>Delivery Warehouse</label>
                                            <div>
                                                <select v-select2 id="warehouse_in">
                                                    <option value='0'>all</option>
                                                    <option v-for="item in warehouseList" v-bind:value="item.Value"
                                                        v-bind:selected="$index===0" v-text="item.Text"></option>
                                                </select>
                                            </div>
                                        </li>
                                        <li class="filter-item ">
                                            <label>Entry Warehouse</label>
                                            <div>
                                                <select v-select2 id="warehouse_out">
                                                    <option value='0'>all</option>
                                                    <option v-for="item in warehouseList" v-bind:value="item.Value"
                                                        v-bind:selected="$index===0" v-text="item.Text"></option>
                                                </select>
                                            </div>
                                        </li>
                                        <li class="filter-item ">
                                            <label>Created By</label>
                                            <div>
                                                <div class="fill-wrapper">
                                                    <input id="serialNumber" type="text" class="fill-item">
                                                </div>
                                            </div>
                                        </li>
                                        <li class="filter-item">
                                            <label class="checkbox-wrapper" style="width: 140px;"><input class="revision-checkbox"
                                                    type="checkbox" id="isEfficacious" /> Display Canceled List</label>
                                        </li>
                                        <li class="filter-item">
                                            <a class="revision-btn revision-btn-search">Search</a>
                                            <a href="javascript:;" class="more">More<i class="revision-icon-more"></i></a>
                                        </li>
                                    </ul>
                                </div>
                            </div>
                        </div>
                        <div class="col-sm-12" style="padding: 12px 0px 12px 0px;">
                            <div class="alert alert-info" style="margin-bottom: 0px">
                                <a class="revision-btn" v-on:click="addShow()">New Allocation</a>
                                <a class="revision-btn" v-on:click="exportShow()">Import</a>
                                <span>Total：<span>12 rows</span></span>&nbsp;&nbsp;<span>Borrow Fund  <span>812,000</span></span>
                            </div>
                        </div>
                        <table class="table table-hover table-bordered">
                            <thead>
                                <tr>
                                    <th>#Number</th>
                                    <th>Allocate Date</th>
                                    <th>Allocate Code</th>
                                    <th>Allocate Warehouse</th>
                                    <th>Allocated Warehouse</th>
                                    <th>Transfer Item</th>
                                    <th>Status</th>
                                    <th>Audit Status</th>
                                    <th>Created By</th>
                                    <th>Operation</th>
                                </tr>
                            </thead>
                            <tbody>
                                <tr>
                                    <td>1</td>
                                    <td>2018-12-20</td>
                                    <td>DBD20181240004</td>
                                    <td class="text-navy">Warehouse A</td>
                                    <td class="text-danger">Warehouse B</td>
                                    <td>K-boxing ultra-concentrated low foam Car Wash Shampoo</td>
                                    <td class="text-navy">returned</td>
                                    <td>pending CEO approval
                                        <div>
                                            <a class="text-navy" href="javascript:;">Approval Progress</a>
                                        </div>
                                    </td>
                                    <td>Boss</td>
                                    <td>
                                        <a href="javascript:;" v-on:click="detailShow(1)">Detail</a>
                                        <a href="javascript:;" v-on:click="detailShow(3)">Delete</a>
                                    </td>
                                </tr>
                                <tr>
                                    <td>2</td>
                                    <td>2018-12-23</td>
                                    <td>DBD20181240003</td>
                                    <td class="text-navy">Warehouse A</td>
                                    <td class="text-danger">Warehouse B</td>
                                    <td>K-boxing ultra-concentrated low foam Car Wash Shampoo</td>
                                    <td class="text-navy">returned</td>
                                    <td>pending warehouse A approval
                                        <div>
                                            <a class="text-navy" href="javascript:;">Approval Progress</a>
                                        </div>
                                    </td>
                                    <td>Boss</td>
                                    <td>
                                        <a href="javascript:;" v-on:click="detailShow(1)">Detail</a>
                                        <a href="javascript:;" v-on:click="detailShow(3)">Delete</a>
                                    </td>
                                </tr>
                                <tr>
                                    <td>3</td>
                                    <td>2018-12-25</td>
                                    <td>DBD20181240007</td>
                                    <td class="text-navy">Warehouse A</td>
                                    <td class="text-danger">Warehouse B</td>
                                    <td>K-boxing ultra-concentrated low foam Car Wash Shampoo</td>
                                    <td class="amount">no return</td>
                                    <td>pending warehouse B approval
                                        <div>
                                            <a class="text-navy" href="javascript:;">Approval Progress</a>
                                        </div>
                                    </td>
                                    <td>Boss</td>
                                    <td>
                                        <a href="javascript:;" v-on:click="detailShow(1)">Detail</a>
                                        <a href="javascript:;" v-on:click="detailShow(3)">Delete</a>
                                    </td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                </div>
            </div>
            <div style="display: none;" v-show="pageInit">
                <!-- 新增Allocation -->
                <modal v-bind:show.sync="addModal.show" v-bind:style="addModal .style" v-bind:add-class="addModal.addClass">
                    <h4 slot="header">New Allocation
                        <span class="title-tips">Allocation Code：<span>DBD20181220005</span></span>
                        <span class="title-tips">Created Date：<span>2018-12-25 14:40:58</span></span>
                        <span class="title-tips">Created By：<span>Tom</span></span>
                    </h4>
                    <div slot="body" class="clearfix">
                        <div class="panel blank-panel">
                            <div class="panel-options">
                                <ul class="nav nav-tabs">
                                    <li class="active"><a data-toggle="tab" href="#tab-4">Entry Scanning</a>
                                    </li>
                                    <li class=""><a data-toggle="tab" href="#tab-5" aria-expanded="false">Entry Manual</a>
                                    </li>
                                    <li class=""><a data-toggle="tab" href="#tab-6" aria-expanded="false">Import</a>
                                    </li>
                                </ul>
                            </div>
                            <div class="panel-body">
                                <div class="tab-content">
                                    <div id="tab-4" class="tab-pane active">
                                        <form class="form-horizontal" novalidate="novalidate">
                                            <div class="form-group" style="margin-bottom:0px">
                                                <div class="col-sm-8">
                                                    <input class="fill-item timeChoose" placeholder="Please enter or scan the item number/barcode/serial number"
                                                        type="text" style="border:2px solid #444" />
                                                </div>
                                            </div>
                                        </form>
                                    </div>
                                    <div id="tab-5" class="tab-pane">
                                        <a class="revision-btn" href="javascript:;" v-on:click="selectProduct()">Batch Select Items</a>
                                    </div>
                                    <div id="tab-6" class="tab-pane">
                                        <a class="revision-btn" href="javascript:;" v-on:click="relevanceShow()">Import Item</a>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div>
                            <h3 class="panel-title">Select Item
                                <span class="title-tips">Warning:Maximum 100/order</span>
                            </h3>
                        </div>
                        <form class="form-horizontal m-t" novalidate="novalidate">
                            <table class="table table-hover table-bordered">
                                <thead>
                                    <tr>
                                        <th style="width: 70px;">Number</th>
                                        <th>Item Name/Specifications</th>
                                        <th style="width: 80px;">Item Code</th>
                                        <th style="width: 70px;">Attributes</th>
                                        <th style="width: 50px;">Unit</th>
                                        <th style="width: 70px;">Quantity</th>
                                        <th style="width: 80px;">Unit-price(¥)</th>
                                        <th style="width: 80px;">Total Prices(¥)</th>
                                        <th style="width: 120px;">Remark</th>
                                    </tr>
                                </thead>
                                <tbody>
                                    <tr v-for="item in productChooseList" v-bind:data-index="$index">
                                        <td><span v-text="$index+1"></span>
                                            <span style="padding: 0px 0px 0px 5px;"><a href="javascript:;">Delete</a></span>
                                        </td>
                                        <td> <span v-text="item.productName"></span><span v-if="item.prope!=''">/</span><span
                                                v-text="item.prope"></span></td>
                                        <td class="text-navy"><span v-text="item.productCode"></span></td>
                                        <td><span v-text="item.prope"></span></td>
                                        <td><span v-text="item.spec"></span></td>
                                        <td class="text-navy">
                                            <input class="fill-item" type="text" value="{{item.Stock Count}}" />
                                        </td>
                                        <td class="amount">
                                            <input class="fill-item" type="text" value="{{item.price}}" />
                                        </td>
                                        <td class="amount">
                                            <input class="fill-item" type="text" value="{{item.price*item.Stock Count}}" />
                                        </td>
                                        <td>
                                            <input class="fill-item" type="text" />
                                        </td>
                                    </tr>
                                </tbody>
                            </table>
                            <div>
                                <h3 class="panel-title">Basic Information</h3>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-1 control-label">Stock-in Warehouse</label>
                                <div class="col-sm-3">
                                    <select id="warehouseAdd_in">
                                        <option v-for="item in warehouseList" v-bind:value="item.Value" v-bind:selected="$index===0"
                                            v-text="item.Text"></option>
                                    </select>
                                </div>
                                <label class="col-sm-1 control-label">Stock-out Warehouse</label>
                                <div class="col-sm-3">
                                    <select id="warehouseAdd_out">
                                        <option v-for="item in warehouseList" v-bind:value="item.Value" v-bind:selected="$index===0"
                                            v-text="item.Text"></option>
                                    </select>
                                </div>
                                <label class="col-sm-1 control-label">Need Express</label>
                                <div class="col-sm-3">
                                    <select id="is_express">
                                        <option value="0">-</option>
                                        <option value="1">Yes</option>
                                        <option value="2">No</option>
                                    </select>
                                </div>
                            </div>
                            <div v-show="expressFlag==true">
                                <h3 class="panel-title">Express Information</h3>
                            </div>
                            <div class="form-group" v-show="expressFlag">
                                <label class="col-sm-1 control-label">Logistics Company</label>
                                <div class="col-sm-3">
                                    <select id="logistics">
                                        <option value='0'>-</option>
                                        <option value='1'>YTO express</option>
                                        <option value='2'>sf-express</option>
                                        <option value='3'>Internal transportation</option>
                                    </select>
                                </div>
                                <label class="col-sm-1 control-label">Deliveryman</label>
                                <div class="col-sm-3">
                                    <input class="form-control w-160" value="{{name}}" type="text" readonly />
                                </div>
                                <label class="col-sm-1 control-label">Mobile</label>
                                <div class="col-sm-3">
                                    <input class="form-control w-160" value="{{telphone}}" type="text" readonly />
                                </div>
                            </div>
                            <div class="form-group" v-show="expressFlag">
                                <label class="col-sm-1 control-label">Address</label>
                                <div class="col-sm-7">
                                    <textarea id="ccomment" name="comment" class="form-control" style="height: 34px;"></textarea>
                                </div>
                            </div>
                            <div>
                                <h3 class="panel-title">Payment Information</h3>
                            </div>
                            <div class="form-group" style="margin-top: 15px">
                                <label class="col-sm-1 control-label">Settlement account</label>
                                <div class="col-sm-3">
                                    <select id="account">
                                        <option v-for="item in accountList" v-bind:value="item.Value" v-bind:selected="$index===0"
                                            v-text="item.Text"></option>
                                    </select>
                                </div>
                                <label class="col-sm-1 control-label">Other expenses</label>
                                <div class="col-sm-3">
                                    <input id="lastname" name="lastname" class="form-control" type="text">
                                </div>
                                <label class="col-sm-1 control-label">Total prices</label>
                                <div class="col-sm-3">
                                    <input id="lastname" name="lastname" class="form-control" type="text" readonly>
                                </div>
                            </div>
                            <div>
                                <h3 class="panel-title">Other information
                            </div>
                            <div class="form-group">
                                <label class="col-sm-1 control-label">Remark</label>
                                <div class="col-sm-8">
                                    <textarea id="ccomment" name="comment" class="form-control" style="height: 55px;"></textarea>
                                </div>
                            </div>
                        </form>
                    </div>
                    <div slot="footer" style="text-align:center">
                        <a href="javascript:;" class="revision-btn"> Save</a>
                        <a href="javascript:;"  class="revision-btn-default" v-on:click="this.addModal.close()"> Cancel</a>
                    </div>
                </modal>
                <!-- 选择商品 -->
                <modal v-bind:show.sync="productSelectModal.show" v-bind:style="productSelectModal .style"
                    v-bind:add-class="productSelectModal.addClass">
                    <h4 slot="header">Select Item</h4>
                    <div slot="body" class="clearfix">
                        <div class="search-condition">
                            <div>
                                <div class="filter-wrapper">
                                    <ul class="clearfix">
                                        <li class="filter-item " style="width: 330px;">
                                            <label>Item Code</label>
                                            <div>
                                                <div class="fill-wrapper">
                                                    <input id="serialNumber" type="text" class="fill-item">
                                                </div>
                                            </div>
                                        </li>
                                        <li class="filter-item ">
                                            <label>Item Name</label>
                                            <div>
                                                <div class="fill-wrapper">
                                                    <input id="serialNumber" type="text" class="fill-item">
                                                </div>
                                            </div>
                                        </li>
                                        <li class="filter-item ">
                                            <a class="revision-btn" href="javascript:;">Search</a>
                                        </li>
                                    </ul>
                                </div>
                            </div>
                        </div>
                        <form class="form-horizontal m-t" novalidate="novalidate">
                            <table class="table table-hover table-bordered">
                                <thead>
                                    <tr>
                                        <th style="width: 50px;">
                                            <input class="revision-checkbox" type="checkbox" v-model="item.checked"
                                                v-on:click="productChooseClick(item)">
                                        </th>
                                        <th style="width: 50px;">Number</th>
                                        <th>Item Name/Specifications</th>
                                        <th style="width: 50px;">Unit</th>
                                        <th style="width: 50px;">Picture</th>
                                        <th style="width: 70px;">Purchase Price</th>
                                        <th style="width: 80px;">Stock Quantity</th>
                                    </tr>
                                </thead>
                                <tbody>
                                    <tr v-for="item in productListSelect">
                                        <td>
                                            <input class="revision-checkbox" type="checkbox" v-on:click="productChooseClick(item)">
                                        </td>
                                        <td>
                                            <input type="text" class="fill-item" style="width: 50px">
                                        </td>
                                        <td>
                                            K-boxing interior detergent/12L
                                        </td>
                                        <td><span v-text="item.spec"></span></td>
                                        <td>
                                            <img style="height: 80px;width: 80px;margin-bottom: 6px;margin-top: 6px;float: left;"
                                                src="../content/static/img/no_pic.png">
                                        </td>
                                        <td class="text-navy"><span v-text="item.Stock Count"></span></td>
                                        <td class="text-navy"><span v-text="item.inventoryCount"></span></td>
                                    </tr>
                                </tbody>
                            </table>
                        </form>
                        <!--<div style="color: #fb7cd5">此处前端分页处理/后端也行</div>-->
                    </div>
                </modal>
                <!-- Allocation详情 -->
                <modal v-bind:show.sync="detailModal.show" v-bind:style="detailModal .style" v-bind:add-class="detailModal.addClass">
                    <h4 slot="header">Detail</h4>
                    <div slot="body" class="clearfix">
                        <div class="approve-detail-modal-title">
                            <h2>Allocation Detail</h2>
                        </div>
                        <ul class="bill-tips clearfix">
                            <li>
                                <em>Allocate Code</em>
                                <span>DBD20181220005</span>
                            </li>
                            <li>
                                <em>Allocate Date</em>
                                <span>2018-12-22</span>
                            </li>
                            <li>
                                <em>Allocated By</em>
                                <span>Mr. Wang</span>
                            </li>
                            <li>
                                <em>Audit Status</em>
                                <span class="text-navy">pending CEO approval</span>
                            </li>
                            <li>
                                <em>Allocate Warehouse</em>
                                <span class="text-navy">Warehouse A</span>
                            </li>
                            <li>
                                <em>Allocated Warehouse</em>
                                <span class="text-navy">Warehouse B</span>
                            </li>
                            <li class="w-100">
                                <em>Remark</em>
                                <span>returned</span>
                            </li>
                        </ul>
                        <form class="form-horizontal m-t" novalidate="novalidate">
                            <div>
                                <h3 class="panel-title">Allocate Information<span class="title-tips">Pre-allocated commodities can only be reselled or returned in full.</span></h3>
                            </div>
                            <div class="search-list" style="text-align:right;padding: 10px 10px 10px;">
                                <div>
                                    <div class="filter-wrapper">
                                        <ul class="clearfix">
                                            <li class="filter-item " style="padding: 1px 15px;">
                                                <label style="width: 60px;">Item Name</label>
                                                <div style="margin-left: 60px;">
                                                    <div class="fill-wrapper" style="width: 130px;">
                                                        <input id="serialNumber" type="text" class="fill-item">
                                                    </div>
                                                </div>
                                            </li>
                                            <li class="filter-item " style="padding: 1px 15px;">
                                                <label style="width: 60px;">Item Code</label>
                                                <div style="margin-left: 60px;">
                                                    <div class="fill-wrapper fill-wrapper-auto">
                                                        <input type="text" class="fill-item ">
                                                    </div>
                                                </div>
                                            </li>
                                            <li class="filter-item " style="padding: 1px 15px;">
                                                <label style="width: 60px;">Return Status</label>
                                                <div style="margin-left: 60px;">
                                                    <select id="backStatus">
                                                        <option v-for="item in backStatusList" v-bind:value="item.Value"
                                                            v-bind:selected="$index===0" v-text="item.Text"></option>
                                                    </select>
                                                </div>
                                            </li>
                                            <li class="filter-item">
                                                <a class="revision-btn revision-btn-search" style="right: 20px;">Search</a>
                                            </li>
                                        </ul>
                                    </div>
                                </div>
                            </div>
                            <div class="col-sm-12" style="padding: 0px;">
                                <div class="alert alert-info" style="margin: 10px 0px;">
                                    <span>Allocate Fund：<span class="amount">812,000</span></span>&nbsp;&nbsp;&nbsp;&nbsp;
                                    <span>Settlement Account：<span class="amount">Cash</span></span>&nbsp;&nbsp;&nbsp;&nbsp;
                                    <span>Total<span class="text-navy">8 </span>rows</span>
                                </div>
                            </div>
                            <table class="table table-hover table-bordered" style="margin-top: 10px">
                                <thead>
                                    <tr>
                                        <th style="width: 50px;">
                                            <input class="revision-checkbox" type="checkbox" v-model="item.checked"
                                                v-on:click="productChooseClick(item)">
                                        </th>
                                        <th>Item Name/Specifications</th>
                                        <th>Item Code</th>
                                        <th style="width: 50px;">Attributes</th>
                                        <th style="width: 50px;">Unit</th>
                                        <th style="width: 50px;">Quantity</th>
                                        <th style="width: 70px;">Returned</th>
                                        <th style="width: 70px;">No Return</th>
                                        <th style="width: 70px;">Transfer Sale</th>
                                        <th style="width: 70px;">Unit-price(¥)</th>
                                        <th style="width: 80px;">Total Prices(¥)</th>
                                        <th style="width: 80px;">Remark</th>
                                    </tr>
                                </thead>
                                <tbody>
                                    <tr>
                                        <td> <input disabled class="revision-checkbox" type="checkbox" v-on:click="productChooseClick(item)"></td>
                                        <td>triangle valve/daily use</td>
                                        <td>SP20150717002</td>
                                        <td></td>
                                        <td>piece</td>
                                        <td class="text-navy">1</td>
                                        <td>1</td>
                                        <td>0</td>
                                        <td>1</td>
                                        <td class="amount">0</td>
                                        <td class="amount">8.00</td>
                                        <td></td>
                                    </tr>
                                    <tr>
                                        <td> <input disabled class="revision-checkbox" type="checkbox" v-on:click="productChooseClick(item)"></td>
                                        <td>K-boxing ultra-concentrated low foam Car Wash Shampoo/12L</td>
                                        <td>Q01</td>
                                        <td></td>
                                        <td>bucket</td>
                                        <td class="text-navy">1</td>
                                        <td>1</td>
                                        <td>0</td>
                                        <td>0</td>
                                        <td class="amount">156.00</td>
                                        <td class="amount">156.00</td>
                                        <td></td>
                                    </tr>
                                    <tr>
                                        <td> <input class="revision-checkbox" type="checkbox" v-on:click="productChooseClick(item)"></td>
                                        <td>K-boxing interior detergent/5L/12L</td>
                                        <td>Q0961243218</td>
                                        <td></td>
                                        <td>bucket</td>
                                        <td class="text-navy">9</td>
                                        <td>3</td>
                                        <td>6</td>
                                        <td>0</td>
                                        <td class="amount">356.00</td>
                                        <td class="amount">356.00</td>
                                        <td></td>
                                    </tr>
                                </tbody>
                            </table>
                        </form>
                        
                    </div>
                </modal>
            </div>
        </div>
    </div>
    <script src="../content/js/lib/vue/vue.min.js"></script>
    <script src="../content/static/js/jquery.min.js?v=2.1.4"></script>
    <script src="../content/static/js/bootstrap.min.js?v=3.3.5"></script>
    <script src="../content/static/js/plugins/chosen/chosen.jquery.js"></script>
    <script src="../content/static/js/plugins/bootstrap-table/bootstrap-table.min.js"></script>
    <script src="../content/static/js/content.min.js?v=1.0.0"></script>
    <script src="../content/js/lib/calendar/calendar.js"></script>
    <script src="../content/js/lib/calendar/scrollbar.js"></script>
    <script src="../content/js/lib/vue/vue-modal.js"></script>
    <script src="../content/js/lib/vue/vue-pagination.js"></script>
    <script src="../content/js/common.js"></script>
    <script src="../content/js/lib/vue/select2.js"></script>
    <script type="text/javascript">
        $(function () {
            //时间验证
            var calObj = new $.Calendar({
                //time: true,
                skin: 'white'
            });
            $('#costTimeStart').focus(function () {
                var $this = $(this),
                    val = $this.val(),
                    endTime = $('#costTimeEnd').val();
                calObj.pick({
                    elem: this,
                    endDate: endTime
                });
            });
            $('#costTimeEnd').focus(function () {
                var $this = $(this),
                    val = $this.val(),
                    startTime = $('#costTimeStart').val();
                calObj.pick({
                    elem: this,
                    startDate: startTime
                });
            });
            $('#backTime').focus(function () {
                var $this = $(this),
                    val = $this.val(),
                    startTime = new Date();
                calObj.pick({
                    elem: this,
                    startDate: startTime
                });
            });
        });
        $("#warehouse_in").select2({
            width: "220px"
        });
        $("#warehouse_out").select2({
            width: "220px"
        });
        $("#status").select2({
            width: "220px"
        });
        $("#approveStatus").select2({
            width: "220px"
        });
        var vmData = {
            pushModal: {
                show: false,
                style: {
                    width: '980px',
                    height: "auto"
                },
                addClass: 'scroll-modal',
                func: {
                    type: Function
                },
                close: function () {
                    vm.pushModal.show = false;
                }
            },
            backModal: {
                show: false,
                style: {
                    width: '980px',
                    height: "auto"
                },
                addClass: 'scroll-modal',
                func: {
                    type: Function
                },
                close: function () {
                    vm.backModal.show = false;
                }
            },
            detailModal: {
                show: false,
                style: {
                    width: '980px',
                    height: "auto"
                },
                addClass: 'scroll-modal',
                func: {
                    type: Function
                },
                close: function () {
                    vm.detailModal.show = false;
                }
            },
            addModal: {
                show: false,
                style: {
                    width: '980px',
                    height: "auto"
                },
                addClass: 'scroll-modal',
                func: {
                    type: Function
                },
                close: function () {
                    vm.addModal.show = false;
                }
            },
            productSelectModal: {
                show: false,
                style: {
                    width: '980px',
                    height: "auto"
                },
                addClass: 'scroll-modal',
                func: {
                    type: Function
                },
                close: function () {
                    vm.productSelectModal.show = false;
                }
            },
            modelTitle: "",
            approveStatusList: [{
                    "Text": "all",
                    "Value": "553",
                },
                {
                    "Text": "pending project manager approval",
                    "Value": "553",
                },
                {
                    "Text": "pending CEO approval",
                    "Value": "553",
                },
                {
                    "Text": "pending warehouse A leader approval",
                    "Value": "553",
                },
                {
                    "Text": "pending warehouse B leader approval",
                    "Value": "553",
                },
                {
                    "Text": "pending sale manager approval",
                    "Value": "553",
                },
            ],
            backStatusList: [{
                    "Text": "all",
                    "Value": "553",
                },
                {
                    "Text": "no return",
                    "Value": "360",
                }, {
                    "Text": "returned",
                    "Value": "365",
                },
                {
                    "Text": "transfer sale",
                    "Value": "4105",
                }
            ],
            warehouseList: [{
                "Text": "Beijing",
                "Value": "553",
            },
                {
                    "Text": "Shanghai",
                    "Value": "360",
                },
                {
                    "Text": "Guangzhou",
                    "Value": "4105",
                }, {
                    "Text": "Arctic Ocean",
                    "Value": "510",
                },
                {
                    "Text": "Shenzhen",
                    "Value": "3219",
                },
                {
                    "Text": "Tianjin",
                    "Value": "99402",
                },
                {
                    "Text": "Hefei",
                    "Value": "519",
                },
                {
                    "Text": "Suzhou",
                    "Value": "518",
                },
                {
                    "Text": "Nanjing",
                    "Value": "517",
                },
                {
                    "Text": "Wuxi",
                    "Value": "525",
                },
                {
                    "Text": "North East China",
                    "Value": "528",
                },
                {
                    "Text": "North West China",
                    "Value": "533",
                },
                {
                    "Text": "Africa",
                    "Value": "538",
                },
                {
                    "Text": "Europe",
                    "Value": "537",
                },
                {
                    "Text": "South America",
                    "Value": "536",
                }
            ],
            modelFlag: 0,
            selectProductItem: [],
            productListSelect: [{
                "checked": false,
                "Id": "1",
                "productCode": "SP20150717002",
                "productName": "Triangle valve",
                "spec": "bucket",
                "prope": "Universal",
                "Stock Count": "12",
                "inventoryCount": "12",
                "remark": "",
                "barCode": "",
                "img": "../content/static/img/no_pic.png",
                "status": ""
            },
                {
                    "checked": false,
                    "Id": "2",
                    "productCode": "SP20150717002",
                    "productName": "K-boxing Leather Cleaner",
                    "spec": "bucket",
                    "prope": "5L",
                    "Stock Count": "1",
                    "inventoryCount": "1",
                    "remark": "",
                    "barCode": "",
                    "img": "../content/static/img/no_pic.png",
                    "status": ""
                }, {
                    "checked": false,
                    "Id": "3",
                    "productCode": "SP20150717002",
                    "productName": "Quick Guard Interior Cleaner",
                    "spec": "bottle",
                    "prope": "500ML",
                    "Stock Count": "52",
                    "inventoryCount": "52",
                    "remark": "",
                    "barCode": "",
                    "img": "../content/static/img/no_pic.png",
                    "status": ""
                }, {
                    "checked": false,
                    "Id": "4",
                    "productCode": "SP20150717002",
                    "productName": "Lacquer Supreme Crystal-plated Suit",
                    "spec": "set",
                    "prope": "",
                    "Stock Count": "14",
                    "inventoryCount": "15",
                    "remark": "",
                    "barCode": "",
                    "img": "../content/static/img/no_pic.png",
                    "status": ""
                }
            ],
            productChooseList: [],
            accountList: [{
                "Text": "Bank Of China",
                "Value": "1",
            }, {
                "Text": "China Construction Bank",
                "Value": "2",
            }, {
                "Text": "Agricultural Bank of China ",
                "Value": "3",
            }, {
                "Text": "ICBC",
                "Value": "4",
            }, {
                "Text": "cash",
                "Value": "5",
            }, ],
        };
        vmData = $.extend(vmData, baseData);
        var vmMothod = {
            init: function () {},
            detailShow: function (obj) {
                vm.detailModal.show = true;
                $("#backStatus").select2({
                    width: "160px"
                });
                $("#backStatus").val('').trigger('change'); //初始化
            },
            addShow: function () {
                vm.addModal.show = true;
                $("#warehouseAdd_in").select2({
                    width: "160px"
                });
                $("#warehouseAdd_in").val('').trigger('change'); //初始化
                $("#warehouseAdd_out").select2({
                    width: "160px"
                });
                $("#warehouseAdd_out").val('').trigger('change'); //初始化
                $("#account").select2({
                    width: "160px"
                });
                $("#account").val('').trigger('change'); //初始化

                $("#is_express").select2({
                    width: "160px"
                });
                $("#is_express").on("select2:select", function () {
                    var data = $(this).val();
                    if (data == "1") {
                        vm.$set("expressFlag", true);
                    } else {
                        vm.$set("expressFlag", false);
                    }
                });
                $("#logistics").select2({
                    width: "160px"
                });
                $("#logistics").on("select2:select", function () {
                    var data = $(this).val();
                    vm.$set("name", "Mr. Chen");
                    vm.$set("telphone", "1500000000");
                });
            },
            selectProduct: function () {
                vm.productSelectModal.show = true;
            },
            productChooseClick: function (e) {
                if (e.checked) {
                    vm.productChooseList.forEach(function (a, v) {
                        if (a.Id = v.Id)
                            vm.productChooseList.splice(v, 1);
                    });
                } else {
                    vm.productChooseList.push(e);
                }
            },
            backShow: function () {
                vm.backModal.show = true;
            },
            saleShow: function () {
                vm.pushModal.show = true;
                $("#salTtype").select2({
                    width: "100px"
                });
                $("#salTtype").val('').trigger('change'); //初始化
                $("#account").select2({
                    width: "210px"
                });
                $("#account").val('').trigger('change'); //初始化

                $("#discount").select2({
                    width: "210px"
                });
                $("#discount").val('').trigger('change'); //初始化
            }
        };
        vmMothod = $.extend(vmMothod, baseCommonFunction);
        var vm = new Vue({
            el: '.content-container',
            data: vmData,
            methods: vmMothod
        });
        vm.init();
    </script>
</body>

</html>